/**
 *
 */
package org.fixies.spreadsheet.converter;

import org.dbunit.dataset.ITable;
import org.fixies.spreadsheet.Unit;

import java.util.Map;

/**
 * @author Kawasaki
 * @version 1.0
 */
public class ITableMapConverter extends SheetToMapConverter<ITable> {

    public Map<String, ITable> convert() {
        return doConvert();
    }

    /* (non-Javadoc)
    * @see org.fixies.spreadsheet.converter.HogeConverter#isTarget(org.fixies.spreadsheet.Unit)
    */

    @Override
    protected boolean isTarget(Unit unit) {
        return unit.getRequiredMetaData("TYPE").equals("TABLE");
    }

    /* (non-Javadoc)
     * @see org.fixies.spreadsheet.converter.HogeConverter#convert(org.fixies.spreadsheet.Unit, java.util.Map)
     */

    @Override
    protected ITable convert(Unit unit) {
        ITableConverter c = new ITableConverter();
        c.setDataSet(unit);
        return c.convert();
    }

}
